package com.wj.core.common.client;

import com.wj.core.dto.Request;
import com.wj.core.dto.Response;
import com.wj.core.serialize.Serializer;

/**
 * @author: wangjun
 * @create: 2018-05-31 
 **/
public abstract class IClient {

  private String serverAddress;

  private Serializer serializer;

  private Long timeoutLimit;

  public void init(final String serverAddress, final Serializer serializer, final Long timeoutLimit) {
    this.serverAddress = serverAddress;
    this.serializer = serializer;
    this.timeoutLimit = timeoutLimit;
  }

  public abstract Response sendMsg(Request request) throws Exception;
}
